package com.itheima.demo3;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

public class FunctionDemo2 {
    public static void main(String[] args) {

        ArrayList<String> list = new ArrayList<>();
        Collections.addAll(list,"张无忌-15","周芷若-18","赵敏-16","张强-20","高启强-35","张三丰-100","老莫-38","谢逊-40");


        //构造方法的引用        Student::new
        List<Student> collect = list.stream().map(Student::new).collect(Collectors.toList());
        System.out.println(collect);


    }
}
